class GenericNumber<T> {
  zValue!: T;
  add!: (x: T, y: T) => T;
}

let myNumber = new GenericNumber<number>();

myNumber.zValue = 0;
myNumber.add = (x: number, y: number) => {
  return x + y;
};
console.log(myNumber.add(1, 2));

let myString = new GenericNumber<string>();
myString.zValue = "zero";
myString.add = (x: string, y: string) => {
  return x + y;
};
console.log(myString.add("hello ", "world"));

export {};
